global class MyEMailHandler {

WebService static Messaging.InboundEMailResult doIt(Messaging.InboundEmail email) {
System.debug ('from: '+email.fromAddress);
System.debug ('HTML: '+email.htmlBody);
System.debug ('plain text: '+email.plainTextBody);

if (email.subject.equals('Contact'))
{
Contact[] newContacts=new Contact[0];
    String inputStr = email.plainTextBody;
    String patternStr = ',';
    String[] fields = inputStr.split(patternStr);

System.debug ('Field: '+fields[0]);

newContacts.add (new Contact(FirstName=fields[0],
LastName=fields[1],
Email=email.fromAddress));
insert newContacts;
}
return new Messaging.InboundEmailResult();
}


}